-- GENERATED SPELL FOR [The Duke of Fathoms] --


function spell0_15207(pUnit, Event) --@Elemental Spawn-in,Self--
pUnit:FullCastSpellOnTarget(25035,pUnit)
pUnit:RegisterEvent('Sorts_15207', 679, 1)
end

function spell1_15207(pUnit, Event) --@Knock Away,n/a--
pUnit:FullCastSpellOnTarget(18670,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15207', 594, 1)
end

function spell2_15207(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(16790,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15207', 2000, 1)
end

function spell3_15207(pUnit, Event) --@Thrash,Self--
pUnit:FullCastSpellOnTarget(3391,pUnit)
pUnit:RegisterEvent('Sorts_15207', 665, 1)
end

function Sorts_15207(pUnit, Event)
local choix_sorts_15207 = math.random(0, 3)
if choix_sorts_15207 == 0 then
pUnit:RegisterEvent('spell0_15207', 1, 1)
end
if choix_sorts_15207 == 1 then
pUnit:RegisterEvent('spell1_15207', 1, 1)
end
if choix_sorts_15207 == 2 then
pUnit:RegisterEvent('spell2_15207', 1, 1)
end
if choix_sorts_15207 == 3 then
pUnit:RegisterEvent('spell3_15207', 1, 1)
end
end

function mob15207_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15207', math.random(1500, 3000), 1)
end

function mob15207_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15207_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15207_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15207, 1, 'mob15207_Action')
RegisterUnitEvent(15207, 2, 'mob15207_Leave')
RegisterUnitEvent(15207, 3, 'mob15207_Kill')
RegisterUnitEvent(15207, 4, 'mob15207_Die')
